//
//  HomeViewController.m
//  Gourment
//
//  Created by lanou3g on 15/12/9.
//  Copyright © 2015年 DGY. All rights reserved.
//

#import "HomeViewController.h"
#import "bizareaCellCollectionView.h"

@interface HomeViewController ()<UITableViewDataSource,UITableViewDelegate>

// 最底层的collectionview,分两个section,两种布局.
@property (weak, nonatomic) IBOutlet UITableView *ButtomTableView;





@end

@implementation HomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Do any additional setup after loading the view.
}

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 2;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

    return 1;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *linecell=@"linecell";
     bizareaCellCollectionView *bizacell= [tableView dequeueReusableCellWithIdentifier:linecell];
    if (!bizacell) {
        bizacell=[[bizareaCellCollectionView alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:linecell];
    }
    return bizacell;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

    if (indexPath.row==0) {
        return 150;
        
    }else
        return self.view.frame.size.height-150;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
